#include <stdio.h>
int main()
{
	double x, a;
	int n, i;
	scanf("%lf%d", &x, &n);
	getchar();
	char op;
	double sum;
	sum = x;
	for (i = 0; i < n; i++)
	{
		scanf("%c%lf", &op, &a);
		getchar();
		if (op == '+')
		{
			sum = sum + a;
		}
		else if (op == '-')
		{
			sum = sum - a;
		}
	}
	printf("%.2lf", sum);
	return 0;
}

